import React, { useState } from 'react';
import { Button, Input, DatePicker, Form, Select, message } from 'antd';
import { LeftOutlined } from '@ant-design/icons';
import '../wsy/styles/add.css';
import { useNavigate } from 'react-router-dom';
import { RightOutlined } from '@ant-design/icons';

const Addwsy = () => {
  const [form] = Form.useForm();
  const [totalAmount, setTotalAmount] = useState(178)
  const navigate= useNavigate()

  const handleSubmit = (values) => {
    console.log('Booking Details:', values);
    message.success('Booking submitted successfully');
  };
  const [list]=useState(JSON.parse(localStorage.getItem('list')) ||{}) 

  return (
    <div >
      {/* Header */}
      <div className="hea">
        <div className="h">
        <span><LeftOutlined  onClick={()=>navigate(-1)}/></span>
        <h3 >登别石水享温泉酒店</h3></div>
        <div className="e">
            <h4>标准大床房</h4>
            <span>入住:2月26--离店:2月28日;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            共3晚
            </span>
        </div>
      </div>
<div className="bod">
    <div className="bo">
        <div className="bo1">
            <span>房间数</span>
            <select name="" id="">
                <option value="">一间</option>
                <option value="">二间</option>
            </select>
        </div>
        <div className="bo1">
            <span>入住人</span>
            <input type="text" value='卢薇薇'/>
        </div>
        <div className="bo1">
            <span >联系电话</span>
            <input type="text" value="13123456789"/>
        </div>
        <div className="bo1">
            <span style={{float:'left'}}>留房时间</span>
            <div className="b">19.00前</div>
            <div className="a">整晚保留（需要预约）</div>
        </div>

        
    </div>
    <div className="dy">
        <div className="d">
            <p>优惠券</p>
            <span>-￥20</span>
            <p style={{float:'right'}}><RightOutlined /></p>
        </div>
        <div className="d">
            <p>早餐券</p>
            <span>一张</span>
            <p style={{float:'right'}}><RightOutlined /></p>
        </div>
    </div>
    <div className="wen">
    <p>温馨提示:</p>
    <p>1.预付房费，房间将为您整晚保留</p>
    <p>2.取消订单或预订未将不返还优惠券。</p>
    <p>3.酒店办理入住时间为入住当天14:00，早到可能需要等待。</p>
</div>
</div>
<div className="dibu">
    <div className="dub">
        <span>详细< RightOutlined/></span>
    </div>
    <div className="dubu1">
        <div className="guan">
         <span >订单价钱:</span>
        <span style={{color:'red'}}>{totalAmount}</span>   
        </div>
        
        <div className="jin" onClick={()=>navigate('/ding')}>
            提交订单
        </div>
    </div>
</div>
    </div>
  );
};

export default Addwsy;
